Optimal. Leaf size=90 \[ -\frac{\left (2 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac{\left (2 a^2+b^2\right ) \sin (c+d x)}{2 d}-\frac{a b \cos ^3(c+d x)}{6 d}-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0945082, antiderivative size = 90, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3508, 3486, 2633} \[ -\frac{\left (2 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}+\frac{\left (2 a^2+b^2\right ) \sin (c+d x)}{2 d}-\frac{a b \cos ^3(c+d x)}{6 d}-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3508
Rule 3486
Rule 2633
Rubi steps
\begin{align*} \int \cos ^3(c+d x) (a+b \tan (c+d x))^2 \, dx &=-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d}-\frac{1}{2} \int \cos ^3(c+d x) \left (-2 a^2-b^2-a b \tan (c+d x)\right ) \, dx\\ &=-\frac{a b \cos ^3(c+d x)}{6 d}-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d}-\frac{1}{2} \left (-2 a^2-b^2\right ) \int \cos ^3(c+d x) \, dx\\ &=-\frac{a b \cos ^3(c+d x)}{6 d}-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d}-\frac{\left (2 a^2+b^2\right ) \operatorname{Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{2 d}\\ &=-\frac{a b \cos ^3(c+d x)}{6 d}+\frac{\left (2 a^2+b^2\right ) \sin (c+d x)}{2 d}-\frac{\left (2 a^2+b^2\right ) \sin ^3(c+d x)}{6 d}-\frac{b \cos ^3(c+d x) (a+b \tan (c+d x))}{2 d}\\ \end{align*}
Mathematica [A] time = 0.456233, size = 64, normalized size = 0.71 \[ \frac{\sin (c+d x) \left (\left (a^2-b^2\right ) \cos (2 (c+d x))+5 a^2+b^2\right )-3 a b \cos (c+d x)-a b \cos (3 (c+d x))}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.056, size = 52, normalized size = 0.6 \begin{align*}{\frac{1}{d} \left ({\frac{{b}^{2} \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3}}-{\frac{2\,ab \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{3}}+{\frac{{a}^{2} \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.43123, size = 70, normalized size = 0.78 \begin{align*} -\frac{2 \, a b \cos \left (d x + c\right )^{3} - b^{2} \sin \left (d x + c\right )^{3} +{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.86064, size = 120, normalized size = 1.33 \begin{align*} -\frac{2 \, a b \cos \left (d x + c\right )^{3} -{\left ({\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} + b^{2}\right )} \sin \left (d x + c\right )}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan{\left (c + d x \right )}\right )^{2} \cos ^{3}{\left (c + d x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]